package com.application.meizhi.ui.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


import com.application.meizhi.base.BasePresenter;

import butterknife.ButterKnife;

/**
 * Created by gskl on 16/10/9.
 */

public abstract class BaseFragment<T extends BasePresenter> extends Fragment {
    protected T presenter;
    public static final String TAG = "fragment";

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(getLayoutResId(), container, false);
        ButterKnife.bind(this, view);
        initPresenter();
        return view;
    }

    protected abstract int getLayoutResId();

    protected abstract void initPresenter();
}
